﻿//-----------------------------------------------------------------------
// <copyright file="Polygon.cs" company="WorldView Solutions Inc">
//     Copyright (c) WorldView Solutions Inc. This source is subject to the Microsoft Public License (Ms-PL). All other rights reserved.
// </copyright>
//-----------------------------------------------------------------------

using System;
using System.Collections.Generic;
using System.Xml;
using System.Xml.Serialization;

namespace WorldViewSolutions.Geometry
{
    /// <summary>
    /// 
    /// </summary>
    /// <remarks></remarks>
	[Serializable]
	[XmlRoot("polygon")]
	public class Polygon : Geometry
	{
        /// <summary>
        /// Gets or sets the rings.
        /// </summary>
        /// <value>The rings.</value>
        /// <remarks></remarks>
		[XmlElement("rings")]
		public List<Ring> Rings { get; set; }

        /// <summary>
        /// Initializes a new instance of the <see cref="T:System.Object"/> class.
        /// </summary>
        /// <remarks></remarks>
		public Polygon()
		{
            this.Rings = new List<Ring>();
		}

        /// <summary>
        /// Initializes a new instance of the <see cref="Polygon"/> class.
        /// </summary>
        /// <param name="rings">The rings.</param>
        /// <remarks></remarks>
		public Polygon(List<Ring> rings)
		{
			this.Rings = rings != null ? rings : new List<Ring>();
		}
	}
}